package tech.aistar.day02;

import org.springframework.stereotype.Repository;

/**
 * 本类用来演示: 目标对象 - MathDaoImpl
 *
 * @author: success
 * @date: 2021/5/7 10:35 上午
 */
@Repository
public class MathDaoImpl implements IMathDao{
    @Override
    public int add(int a, int b) {
        //与业务相关的代码
        int result = a+b;
        System.out.println("add-result:"+result);
       // System.out.println(10/0);
        return result;
    }

    @Override
    public int sub(int a, int b) {
        //与业务相关的代码
        int result = a-b;
        System.out.println("sub-result:"+result);
        return result;
    }
}
